package com.financial.business.management.controller;

import com.financial.business.management.service.FinancialPayConfigService;
import com.financial.business.management.utils.apiresult.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 支付通道信息表
 * 
 * @author zhaopengjun
 * @email 1428939700@qq.com
 * @date 2019-08-18 22:14:47
 */
 
@RestController
@RequestMapping("/financialPayConfig")
public class FinancialPayConfigController {
	@Autowired
	private FinancialPayConfigService financialPayConfigService;
	
	/**
	 * @Author zhaopengjun
	 * @Description //创建支付通道
	 * @Date 22:19 2019/8/18
	 * @Param 
	 * @return 
	 **/
	@PostMapping("/createPayConfig")
	public ApiResult createPayConfig(String payType){
		return financialPayConfigService.createPayConfig(payType);
	}

	/**
	 * @Author zhaopengjun
	 * @Description //根据支付通道获取支付通道id
	 * @Date 13:12 2019/8/24
	 * @Param
	 * @return
	 **/
	@GetMapping("/getChannelsId")
	public int getChannelsId(@RequestParam String payType){

		return financialPayConfigService.getChannelsId(payType);
	}
}
